Dynomotion

Group: DynoMotion Message: 13506 From: toolhoarder Date: 7/7/2016
Subject: Motor Pops Forward at Start of Cycle
I am still trying to get my z axis working. I turned backlash compensation off, and I am working with the V, A, and J settings in KMotion.

I read up on jerk, and it seemed like the recommended value for NEMA 23 steppers was about 20 times the acceleration, so I tried it, and it appeared to me that the motor jerked so hard it was likely to be making the shaft slip in the collar. I lowered it. I now have V = 35K, A = 350K, and J = 500 (no K). I don't need steppers to zip around like crazy, so I thought it would be okay to keep things slow and smooth.

When I start the test program, moving the z axis 0.500" to the left  with a dial indicator on it, the motor sort of pops before it begins turning for real, and it jumps forward about 0.004". Can someone give me a clue what causes this?

Also, I want to confirm: "Step Dir" is correct for NEMA 23 steppers, right? I know the KFlop always microsteps, but I assumed it was not necessary to use the Microstep setting for the default movement.


Group: DynoMotion Message: 13508 From: Tom Kerekes Date: 7/7/2016
Subject: Re: Motor Pops Forward at Start of Cycle

Hi toolhoarder,

Its essential to have an understanding of what Velocity, Acceleration, and Jerk are and how they interplay.

Read this article and see if you can understand why a Max Jerk setting of 500 steps/sec^3 wouldn't normally make sense with an acceleration of 350,000 steps/sec^2.

http://www.dynomotion.com/wiki/index.php?title=Main_Page#Velocity.2C_Acceleration.2C_and_Jerk

(Hint: how long would it take to ramp to full acceleration)

What kind of stepper Drives do you have?  Do they have an idle mode?

"Step Dir" mode is used for Drives that accept Step and Direction signals.  It's not dependent on what type of motors you have.  But most all Stepper Drives accept Step and Direction signals. 

Regards

TK


On 7/7/2016 2:51 PM, toolhoarder@... [DynoMotion] wrote:
 

I am still trying to get my z axis working. I turned backlash compensation off, and I am working with the V, A, and J settings in KMotion.

I read up on jerk, and it seemed like the recommended value for NEMA 23 steppers was about 20 times the acceleration, so I tried it, and it appeared to me that the motor jerked so hard it was likely to be making the shaft slip in the collar. I lowered it. I now have V = 35K, A = 350K, and J = 500 (no K). I don't need steppers to zip around like crazy, so I thought it would be okay to keep things slow and smooth.

When I start the test program, moving the z axis 0.500" to the left  with a dial indicator on it, the motor sort of pops before it begins turning for real, and it jumps forward about 0.004". Can someone give me a clue what causes this?

Also, I want to confirm: "Step Dir" is correct for NEMA 23 steppers, right? I know the KFlop always microsteps, but I assumed it was not necessary to use the Microstep setting for the default movement.



Group: DynoMotion Message: 13509 From: toolhoarder Date: 7/7/2016
Subject: Re: Motor Pops Forward at Start of Cycle
Thanks for getting back to me. I do understand velocity, acceleration, and jerk. I have a degree in physics and some grad school. I'm just reporting what the machine is doing as I observe it.

I didn't arrive at the 500 figure through calculation. I tried the higher figure, and the machine moved too violently. I kept stepping it down, and I got frustrated because I didn't see significant results, so I put it on 500, figuring I would have to start bumping it up. Then 500 gave me a nice smooth motion. I assume "5e+002" does mean 500.

The motors are connected to a KStep.

Do you have any idea why the motor would jump at the start? Is it because it's powering back on after being idle? The motors relax after a certain amount of down time.
Group: DynoMotion Message: 13510 From: Tom Kerekes Date: 7/8/2016
Subject: Re: Motor Pops Forward at Start of Cycle

Hi toolhoarder,

Sorry its hard to tell someone's skills from emails and our User's backgrounds are all over the map.

With such a low Jerk setting it would take forever (minutes) to reach full acceleration so the Acceleration might as well be infinity as it will never be reached.

Similarly with Velocity it would take a huge distance and many seconds to reach.

So it like having a car driver who is driving recklessly way over the speed limit and using too way much gas/brake and instead of telling him to slow down and use less gas/brake instead you tell him to only move the gas/brake pedal at 1mm/second.  It sort of works and results in him slowing down and using less gas/brake for short drives.

As we try to describe in that article KMotionCNC (and Mach3) coordinated motion paths do not have any Jerk limiting capability so you need to eventually find Acceleration and Velocity Limits that work with your machine without relying on Jerk limiting.

5e+002 = 500

The default Init file for KStep disables the outputs after being idle for a few seconds.  So they may move when disabled then snap back to the commanded microstep position when enabled.  That's likely to be a full step or so of motion and what you are observing.  You can change the time to much longer or remove this code to always keep the motors enabled.  Thee is an example called InitKStep3AxsNoDisable.c 

HTH

Regards

TK


On 7/7/2016 7:04 PM, toolhoarder@... [DynoMotion] wrote:
 

Thanks for getting back to me. I do understand velocity, acceleration, and jerk. I have a degree in physics and some grad school. I'm just reporting what the machine is doing as I observe it.

I didn't arrive at the 500 figure through calculation. I tried the higher figure, and the machine moved too violently. I kept stepping it down, and I got frustrated because I didn't see significant results, so I put it on 500, figuring I would have to start bumping it up. Then 500 gave me a nice smooth motion. I assume "5e+002" does mean 500.

The motors are connected to a KStep.

Do you have any idea why the motor would jump at the start? Is it because it's powering back on after being idle? The motors relax after a certain amount of down time.


Group: DynoMotion Message: 13511 From: toolhoarder Date: 7/8/2016
Subject: Re: Motor Pops Forward at Start of Cycle
The thing I don't understand is that with the jerk set at 500, the tool moves very nicely.

Fixing the initialization jump will cause a new problem, which is locating the tool before the program starts. I've been putting the tool at a good start point, entering coordinates into Mach3, and starting the program. Now I'll need to find a new way to locate the tool. If the motors are always on, it will be impossible to move the tool by hand, so I won't be able to position it before running the program.
Group: DynoMotion Message: 13512 From: Tom Kerekes Date: 7/8/2016
Subject: Re: Motor Pops Forward at Start of Cycle

Hi toolhoarder,

Yes the extreme low jerk limits the acceleration and velocity indirectly by severely limiting the rate at which acceleration can be applied.  Fully Jerk limited motion will be the smoothest in many cases so that shouldn't come as a surprise.  Mach3 uses infinite Jerk when running GCode so that strategy doesn't work.

I think you will need to find a new method to locate the tool.  Stepper motors don't have feedback.  So after manually positioning it with power off is impossible to know where the motor is.  It isn't possible to power up a Stepper Motor and have it hold its current position.  You must choose to command it to some position.   Are you saying that somehow worked for you before? 

Why not Jog to the start point?

Regards

TK



On 7/8/2016 8:52 AM, toolhoarder@... [DynoMotion] wrote:
 

The thing I don't understand is that with the jerk set at 500, the tool moves very nicely.

Fixing the initialization jump will cause a new problem, which is locating the tool before the program starts. I've been putting the tool at a good start point, entering coordinates into Mach3, and starting the program. Now I'll need to find a new way to locate the tool. If the motors are always on, it will be impossible to move the tool by hand, so I won't be able to position it before running the program.


Group: DynoMotion Message: 13515 From: toolhoarder Date: 7/8/2016
Subject: Re: Motor Pops Forward at Start of Cycle
I will start using your jog suggestion, which will surely be better than my own highly original method. I'm having some problems controlling the jogging, but I'm sure the answer is in the documentation somewhere. It really flies in continuous mode. I can't use that; I'll never be within an inch and a half of the start point I want. I would like to be able to get the tool close to the desired point and then creep up on it one thousandth at a time.

My z axis will not move when I use the file you suggested. Not sure why. It looks like I've been using a file I altered in 2014. I completely removed the "axis 2" language; this is a 2-axis machine. Maybe it got confused. When I try to jog it using the file you suggest, the z DRO goes nuts, but the machine doesn't react.

The DefineCoordSystem bit in my file says (0,-1,1,-1); in your file, it's (0,1,2,-1). Wish I had commented to explain why I did that.

I am looking the c files over, trying to find the disable/enable language so I can move it to my existing file. I am probably the only former physicist on earth who never learned anything about computers or programming.
Group: DynoMotion Message: 13517 From: David Strip Date: 7/8/2016
Subject: Re: Motor Pops Forward at Start of Cycle
On 7/8/2016 4:47 PM, toolhoarder@... [DynoMotion] wrote:
I will start using your jog suggestion, which will surely be better than my own highly original method. I'm having some problems controlling the jogging, but I'm sure the answer is in the documentation somewhere. It really flies in continuous mode. I can't use that; I'll never be within an inch and a half of the start point I want. I would like to be able to get the tool close to the desired point and then creep up on it one thousandth at a time.
You can set the jog speed in the Tool Setup screen. For each axis there are two arrow buttons on the interface. The "inner" one moves at half the speed of the outer. The speed in the setup screen is for the faster (outer) button. If you click and release on one of the arrow buttons, you get a single step. The step size is controlled by a set of radio buttons near the jog "keypad". You can use continuous motion (holding the jog key down) to get close, use the half speed to get closer, and then tap in as close as you want  - the step size can be as little as .0001 (units are controlled by whatever the program is using).

--
Group: DynoMotion Message: 13519 From: toolhoarder Date: 7/9/2016
Subject: Re: Motor Pops Forward at Start of Cycle
Can you give me any clues about the language used to prevent the motors from disabling? I can't use the C file provided with the KFlop.
Group: DynoMotion Message: 13520 From: toolhoarder Date: 7/9/2016
Subject: Re: Motor Pops Forward at Start of Cycle
My guess is that the stuff near the end controls disabling, so I removed "10" and inserted "3600," assuming that meant 1 hour before disabling.
Group: DynoMotion Message: 13521 From: toolhoarder Date: 7/9/2016
Subject: Re: Motor Pops Forward at Start of Cycle
Seems to work, but now KMotion crashes when I click "Download Channel," and I have to cycle the KFlop and restart KMotion and Mach3.
Group: DynoMotion Message: 13524 From: toolhoarder Date: 7/9/2016
Subject: Re: Motor Pops Forward at Start of Cycle
I used backslashes to comment out the disable code, and I no longer have program crashes. Looks like it will work.